package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.DepreciationMethodMapper;
import com.ruoyi.finance.domain.DepreciationMethod;
import com.ruoyi.finance.service.IDepreciationMethodService;

/**
 * 折旧方法Service业务层处理
 * 
 * @author 李伟
 * @date 2025-03-06
 */
@Service
public class DepreciationMethodServiceImpl implements IDepreciationMethodService 
{
    @Autowired
    private DepreciationMethodMapper depreciationMethodMapper;

    /**
     * 查询折旧方法
     * 
     * @param id 折旧方法主键
     * @return 折旧方法
     */
    @Override
    public DepreciationMethod selectDepreciationMethodById(Long id)
    {
        return depreciationMethodMapper.selectDepreciationMethodById(id);
    }

    /**
     * 查询折旧方法列表
     * 
     * @param depreciationMethod 折旧方法
     * @return 折旧方法
     */
    @Override
    public List<DepreciationMethod> selectDepreciationMethodList(DepreciationMethod depreciationMethod)
    {
        return depreciationMethodMapper.selectDepreciationMethodList(depreciationMethod);
    }

    /**
     * 新增折旧方法
     * 
     * @param depreciationMethod 折旧方法
     * @return 结果
     */
    @Override
    public int insertDepreciationMethod(DepreciationMethod depreciationMethod)
    {
        return depreciationMethodMapper.insertDepreciationMethod(depreciationMethod);
    }

    /**
     * 修改折旧方法
     * 
     * @param depreciationMethod 折旧方法
     * @return 结果
     */
    @Override
    public int updateDepreciationMethod(DepreciationMethod depreciationMethod)
    {
        return depreciationMethodMapper.updateDepreciationMethod(depreciationMethod);
    }

    /**
     * 批量删除折旧方法
     * 
     * @param ids 需要删除的折旧方法主键
     * @return 结果
     */
    @Override
    public int deleteDepreciationMethodByIds(Long[] ids)
    {
        return depreciationMethodMapper.deleteDepreciationMethodByIds(ids);
    }

    /**
     * 删除折旧方法信息
     * 
     * @param id 折旧方法主键
     * @return 结果
     */
    @Override
    public int deleteDepreciationMethodById(Long id)
    {
        return depreciationMethodMapper.deleteDepreciationMethodById(id);
    }
}
